#ifndef _STM32_CHIP_SPI_TR700_H_
#define _STM32_CHIP_SPI_TR700_H_

#include "spi-tr700-hdr.h"

extern struct tr700_getenv_rx    reg_genv_rx;
extern struct tr700_getenv_tx    reg_genv_tx;
extern struct tr700_getls_dbg_rx reg_getls_dbg_rx;
extern char spi_active_cmd;
extern unsigned long spi_isdebug;

// inline int Spi_isdebug() {return spi_isdebug;}
#define SPI_ISDEBUG() (spi_isdebug)

int spi_analyse();
extern int on_active();
extern void fill_getopm(struct tr700_getopm *val);
extern void fill_getopm_dbg(struct tr700_getopm_dbg *val);
extern void fill_getls_dbg(struct tr700_getls_dbg  *val);
#endif
